package com.codeest.geeknews;

import com.codeest.geeknews.di.component.AppComponent;
import com.codeest.geeknews.di.component.DaggerAppComponent;
import com.codeest.geeknews.di.module.AppModule;

import static org.mockito.Mockito.spy;

/**
 * Created by admin on 2017/7/7.
 */

public class DaggerUtils {
    public static final AppModule appModule = spy(new AppModule(AppUtils.getApp()));

    public static void setupDagger() {
        AppComponent appComponent = DaggerAppComponent.builder().appModule(appModule).build();
        AppUtils.getApp().setComponent(appComponent);
    }
}
